package com.example.lhsama.controller;

import com.example.lhsama.domain.SysLog;
import com.example.lhsama.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @Date: 2021年08月22日 14:50
 * @Author: LHSAMA
 */
@Controller
@RequestMapping("/sysLog")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;

    @RequestMapping("/list")
    public ModelAndView list() throws Exception {
        ModelAndView mv = new ModelAndView();
        List<SysLog> sysLogList = sysLogService.list();
        mv.addObject("sysLogs",sysLogList);
        mv.setViewName("syslog-list");
        return mv;

    }

}
